Skip to content

Conversation

elianiva
Copy link

@elianiva elianiva commented Oct 4, 2025

Related GitHub Issue

Closes: #7922

Roo Code Task Context (Optional)

Description

This PR adds a more user friendly UI to display error caused by rate limit.

Test Procedure

Added a test file along with manual instructions.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Screen.Recording.2025-10-04.at.15.49.48.mov

Documentation Updates

Additional Notes

Get in Touch

@elianiva


Important

Enhances chat UI with a user-friendly rate limit error display, including countdown and retry logic, and updates localization files for multiple languages.

  • Behavior:
    • Adds user-friendly UI for rate limit errors in chat with countdown and retry mechanism.
    • Implements RateLimitRetryRow component in ChatRow.tsx to display retry status.
    • Updates Task.ts to handle rate limit retries with countdown and retry logic.
  • Localization:
    • Adds translations for rate limit retry messages in multiple language files including chat.json for id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, and zh-TW.
  • Testing:
    • Adds RateLimitRetryRow.spec.tsx for testing the new UI component.

This description was created by Ellipsis for 03909fc. You can customize this summary. It will automatically update as commits are pushed.

@elianiva elianiva requested review from mrubens, cte and jr as code owners October 4, 2025 10:50
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused labels Oct 4, 2025
Copy link

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention in this PR.

},
"rateLimitRetry": {
"title": "Batas kecepatan tercapai — mohon tunggu.",
"waiting": "Mencoba lagi dalam {{seconds}}d",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P3] Indonesian seconds abbreviation: The new rateLimitRetry strings use "{{seconds}}d" (lines 157–161). In this locale other strings use "dtk" for seconds (e.g., followUpSuggest.autoSelectCountdown/countdownDisplay). Suggest changing to "{{seconds}}dtk" for waiting*, waitingWithAttempt*, waitingWithAttemptMax to keep consistency.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 4, 2025
Copy link

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found some issues that need attention in this PR.

let rateLimitDelay = 0

const sendRateLimitUpdate = async (payload: RateLimitRetryPayload, isPartial: boolean): Promise<void> => {
await this.say("api_req_retry_delayed", undefined, undefined, isPartial, undefined, undefined, {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Mark rate-limit status updates as non-interactive

api_req_retry_delayed is a UI-only status row and shouldn't mutate lastMessageTs. Currently sendRateLimitUpdate calls say() without isNonInteractive, which updates lastMessageTs for new messages in say(). This can interfere with Task.ask's blocking/waiting logic if a status update races with an ask.

Setting isNonInteractive true keeps the message ordering/UI unchanged while avoiding unintended ask lifecycle interactions.

Suggested change
await this.say("api_req_retry_delayed", undefined, undefined, isPartial, undefined, undefined, {
await this.say("api_req_retry_delayed", undefined, undefined, isPartial, undefined, undefined, {
isNonInteractive: true,
metadata: { rateLimitRetry: payload },
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Spinner + countdown with rate limit triggered — please wait
2 participants